<template>
  <section class="app">
    <router-view></router-view>
  </section>
</template>

<script>
import { onMounted } from 'vue'
import JsBridge from '@/utils/JsBridge.js'

export default {
  setup(props) {
    onMounted(() => {
      console.log('初始化页面')
      JsBridge.callHandler('onLoadSucc', RESOURCE_VERSION, (res) => { })

      // JsBridge.callHandler('checkPermissions', ['android.permission.READ_PHONE_STATE', 'android.permission.READ_CONTACTS', 'android.permission.WRITE_CONTACTS'], (res) => {
      //   const obj = JSON.parse(res)
      //   if (obj.code != 200) {
      //     setTimeout(() => {
      //       JsBridge.callHandler('requestPermissions', ['android.permission.READ_PHONE_STATE', 'android.permission.READ_CONTACTS,android.permission.WRITE_CONTACTS'], (res) => {
      //         console.log(res)
      //       })
      //     }, 500);
      //   }
      // })
    })
  }
}
</script>

<style lang="scss" scoped>
.app {
  height: 100%;
}
</style>